const tabbarRouteKey = [
  
] as const
const prefix = '/pages/', suffix = '/index'
const routerName = {
  ...tabbarRouteKey.reduce((p, c) => {
    p[c] = c
    return p
  }, <{ [x in typeof tabbarRouteKey[number]]: string }>{}),
  home: 'home',
  exchange: 'exchange',
}

for (const key of Object.keys(routerName)) {
  routerName[key] = prefix + routerName[key] + suffix
}

export const isTabbar = (route: string | undefined) => {
  return tabbarRouteKey.some(key => {
    const r = routerName[key] as string
    return route === r
      || route?.startsWith(r) && route?.slice(r.length + 1, r.length + 2) === '?'
  })
}

export default routerName